.class public Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;
.super Ljava/lang/Object;
.source "AccelListener.java"

# interfaces
.implements Landroid/hardware/SensorEventListener;


# static fields
.field private static final FORCE_THRESHOLD:I = 0x3e8

.field private static final LOG:Lcom/burstly/lib/util/LoggerExt; = null

.field private static final SHAKE_COUNT:I = 0x2

.field private static final SHAKE_DURATION:I = 0x7d0

.field private static final SHAKE_TIMEOUT:I = 0x1f4

.field private static final TAG:Ljava/lang/String; = "ORMMA AccelListener"

.field private static final TIME_THRESHOLD:I = 0x64


# instance fields
.field private mAccReady:Z

.field private mAccVals:[F

.field private mActualOrientation:[F

.field private mLastAccVals:[F

.field private mLastForce:J

.field private mLastShake:J

.field private mLastTime:J

.field private mMagReady:Z

.field private mMagVals:[F

.field private mRegisteredHeadingListeners:I

.field private mRegisteredShakeListeners:I

.field private mRegisteredTiltListeners:I

.field private final mSensorController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;

.field private mSensorDelay:I

.field private final mSensorManager:Landroid/hardware/SensorManager;

.field private mShakeCount:I


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 36
    invoke-static {}, Lcom/burstly/lib/util/LoggerExt;->getInstance()Lcom/burstly/lib/util/LoggerExt;

    move-result-object v0

    sput-object v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->LOG:Lcom/burstly/lib/util/LoggerExt;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;)V
    .locals 2
    .parameter "context"
    .parameter "sensorController"

    .prologue
    const/4 v0, 0x0

    const/4 v1, 0x3

    .line 166
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 81
    iput v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredTiltListeners:I

    .line 86
    iput v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredShakeListeners:I

    .line 91
    iput v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredHeadingListeners:I

    .line 96
    iput v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mSensorDelay:I

    .line 132
    new-array v0, v1, [F

    fill-array-data v0, :array_0

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mAccVals:[F

    .line 149
    new-array v0, v1, [F

    fill-array-data v0, :array_1

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mLastAccVals:[F

    .line 156
    new-array v0, v1, [F

    fill-array-data v0, :array_2

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mActualOrientation:[F

    .line 167
    iput-object p2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mSensorController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;

    .line 168
    const-string v0, "sensor"

    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/hardware/SensorManager;

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mSensorManager:Landroid/hardware/SensorManager;

    .line 169
    return-void

    .line 132
    nop

    :array_0
    .array-data 0x4
        0x0t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x0t 0x0t
    .end array-data

    .line 149
    :array_1
    .array-data 0x4
        0x0t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x0t 0x0t
    .end array-data

    .line 156
    :array_2
    .array-data 0x4
        0x0t 0x0t 0x80t 0xbft
        0x0t 0x0t 0x80t 0xbft
        0x0t 0x0t 0x80t 0xbft
    .end array-data
.end method

.method private start()V
    .locals 4

    .prologue
    .line 260
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mSensorManager:Landroid/hardware/SensorManager;

    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Landroid/hardware/SensorManager;->getSensorList(I)Ljava/util/List;

    move-result-object v0

    .line 261
    .local v0, list:Ljava/util/List;,"Ljava/util/List<Landroid/hardware/Sensor;>;"
    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    if-lez v1, :cond_0

    .line 262
    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mSensorManager:Landroid/hardware/SensorManager;

    const/4 v1, 0x0

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/hardware/Sensor;

    iget v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mSensorDelay:I

    invoke-virtual {v2, p0, v1, v3}, Landroid/hardware/SensorManager;->registerListener(Landroid/hardware/SensorEventListener;Landroid/hardware/Sensor;I)Z

    .line 266
    :cond_0
    return-void
.end method

.method private startMag()V
    .locals 4

    .prologue
    .line 238
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mSensorManager:Landroid/hardware/SensorManager;

    const/4 v2, 0x2

    invoke-virtual {v1, v2}, Landroid/hardware/SensorManager;->getSensorList(I)Ljava/util/List;

    move-result-object v0

    .line 239
    .local v0, list:Ljava/util/List;,"Ljava/util/List<Landroid/hardware/Sensor;>;"
    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    if-lez v1, :cond_0

    .line 240
    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mSensorManager:Landroid/hardware/SensorManager;

    const/4 v1, 0x0

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/hardware/Sensor;

    iget v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mSensorDelay:I

    invoke-virtual {v2, p0, v1, v3}, Landroid/hardware/SensorManager;->registerListener(Landroid/hardware/SensorEventListener;Landroid/hardware/Sensor;I)Z

    .line 241
    invoke-direct {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->start()V

    .line 245
    :cond_0
    return-void
.end method


# virtual methods
.method public getHeading()F
    .locals 2

    .prologue
    .line 337
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mActualOrientation:[F

    const/4 v1, 0x0

    aget v0, v0, v1

    return v0
.end method

.method public onAccuracyChanged(Landroid/hardware/Sensor;I)V
    .locals 0
    .parameter "sensor"
    .parameter "accuracy"

    .prologue
    .line 279
    return-void
.end method

.method public onSensorChanged(Landroid/hardware/SensorEvent;)V
    .locals 14
    .parameter "event"

    .prologue
    const/16 v8, 0x9

    const/4 v13, 0x2

    const/4 v12, 0x1

    const/4 v11, 0x0

    .line 283
    iget-object v7, p1, Landroid/hardware/SensorEvent;->sensor:Landroid/hardware/Sensor;

    invoke-virtual {v7}, Landroid/hardware/Sensor;->getType()I

    move-result v7

    packed-switch v7, :pswitch_data_0

    .line 295
    :goto_0
    iget-object v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mMagVals:[F

    if-eqz v7, :cond_0

    iget-object v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mAccVals:[F

    if-eqz v7, :cond_0

    iget-boolean v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mAccReady:Z

    if-eqz v7, :cond_0

    iget-boolean v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mMagReady:Z

    if-eqz v7, :cond_0

    .line 296
    iput-boolean v11, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mAccReady:Z

    .line 297
    iput-boolean v11, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mMagReady:Z

    .line 298
    new-array v5, v8, [F

    .line 299
    .local v5, r:[F
    new-array v2, v8, [F

    .line 300
    .local v2, i:[F
    iget-object v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mAccVals:[F

    iget-object v8, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mMagVals:[F

    invoke-static {v5, v2, v7, v8}, Landroid/hardware/SensorManager;->getRotationMatrix([F[F[F[F)Z

    .line 301
    const/4 v7, 0x3

    new-array v7, v7, [F

    iput-object v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mActualOrientation:[F

    .line 302
    iget-object v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mActualOrientation:[F

    invoke-static {v5, v7}, Landroid/hardware/SensorManager;->getOrientation([F[F)[F

    .line 303
    iget-object v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mSensorController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;

    iget-object v8, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mActualOrientation:[F

    aget v8, v8, v11

    invoke-virtual {v7, v8}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;->onHeadingChange(F)V

    .line 305
    .end local v2           #i:[F
    .end local v5           #r:[F
    :cond_0
    iget-object v7, p1, Landroid/hardware/SensorEvent;->sensor:Landroid/hardware/Sensor;

    invoke-virtual {v7}, Landroid/hardware/Sensor;->getType()I

    move-result v7

    if-ne v7, v12, :cond_4

    .line 306
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v3

    .line 307
    .local v3, now:J
    iget-wide v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mLastForce:J

    sub-long v7, v3, v7

    const-wide/16 v9, 0x1f4

    cmp-long v7, v7, v9

    if-lez v7, :cond_1

    .line 308
    iput v11, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mShakeCount:I

    .line 310
    :cond_1
    iget-wide v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mLastTime:J

    sub-long v7, v3, v7

    const-wide/16 v9, 0x64

    cmp-long v7, v7, v9

    if-lez v7, :cond_4

    .line 311
    iget-wide v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mLastTime:J

    sub-long v0, v3, v7

    .line 312
    .local v0, diff:J
    iget-object v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mAccVals:[F

    aget v7, v7, v11

    iget-object v8, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mAccVals:[F

    aget v8, v8, v12

    add-float/2addr v7, v8

    iget-object v8, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mAccVals:[F

    aget v8, v8, v13

    add-float/2addr v7, v8

    iget-object v8, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mLastAccVals:[F

    aget v8, v8, v11

    sub-float/2addr v7, v8

    iget-object v8, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mLastAccVals:[F

    aget v8, v8, v12

    sub-float/2addr v7, v8

    iget-object v8, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mLastAccVals:[F

    aget v8, v8, v13

    sub-float/2addr v7, v8

    invoke-static {v7}, Ljava/lang/Math;->abs(F)F

    move-result v7

    long-to-float v8, v0

    div-float/2addr v7, v8

    const v8, 0x461c4000

    mul-float v6, v7, v8

    .line 316
    .local v6, speed:F
    const/high16 v7, 0x447a

    cmpl-float v7, v6, v7

    if-lez v7, :cond_3

    .line 317
    iget v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mShakeCount:I

    add-int/lit8 v7, v7, 0x1

    iput v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mShakeCount:I

    if-lt v7, v13, :cond_2

    iget-wide v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mLastShake:J

    sub-long v7, v3, v7

    const-wide/16 v9, 0x7d0

    cmp-long v7, v7, v9

    if-lez v7, :cond_2

    .line 318
    iput-wide v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mLastShake:J

    .line 319
    iput v11, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mShakeCount:I

    .line 320
    iget-object v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mSensorController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;

    invoke-virtual {v7}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;->onShake()V

    .line 322
    :cond_2
    iput-wide v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mLastForce:J

    .line 324
    :cond_3
    iput-wide v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mLastTime:J

    .line 325
    iget-object v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mSensorController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;

    iget-object v8, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mAccVals:[F

    aget v8, v8, v11

    iget-object v9, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mAccVals:[F

    aget v9, v9, v12

    iget-object v10, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mAccVals:[F

    aget v10, v10, v13

    invoke-virtual {v7, v8, v9, v10}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;->onTilt(FFF)V

    .line 329
    .end local v0           #diff:J
    .end local v3           #now:J
    .end local v6           #speed:F
    :cond_4
    return-void

    .line 285
    :pswitch_0
    iget-object v7, p1, Landroid/hardware/SensorEvent;->values:[F

    invoke-virtual {v7}, [F->clone()Ljava/lang/Object;

    move-result-object v7

    check-cast v7, [F

    iput-object v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mMagVals:[F

    .line 286
    iput-boolean v12, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mMagReady:Z

    goto/16 :goto_0

    .line 289
    :pswitch_1
    iget-object v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mAccVals:[F

    iput-object v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mLastAccVals:[F

    .line 290
    iget-object v7, p1, Landroid/hardware/SensorEvent;->values:[F

    invoke-virtual {v7}, [F->clone()Ljava/lang/Object;

    move-result-object v7

    check-cast v7, [F

    iput-object v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mAccVals:[F

    .line 291
    iput-boolean v12, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mAccReady:Z

    goto/16 :goto_0

    .line 283
    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method public setSensorDelay(I)V
    .locals 1
    .parameter "delay"

    .prologue
    .line 177
    iput p1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mSensorDelay:I

    .line 178
    iget v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredTiltListeners:I

    if-gtz v0, :cond_0

    iget v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredShakeListeners:I

    if-lez v0, :cond_1

    .line 179
    :cond_0
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->stop()V

    .line 180
    invoke-direct {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->start()V

    .line 182
    :cond_1
    return-void
.end method

.method public startTrackingHeading()V
    .locals 1

    .prologue
    .line 228
    iget v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredHeadingListeners:I

    if-nez v0, :cond_0

    .line 229
    invoke-direct {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->startMag()V

    .line 231
    :cond_0
    iget v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredHeadingListeners:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredHeadingListeners:I

    .line 232
    return-void
.end method

.method public startTrackingShake()V
    .locals 1

    .prologue
    .line 207
    iget v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredShakeListeners:I

    if-nez v0, :cond_0

    .line 208
    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->setSensorDelay(I)V

    .line 209
    invoke-direct {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->start()V

    .line 211
    :cond_0
    iget v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredShakeListeners:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredShakeListeners:I

    .line 212
    return-void
.end method

.method public startTrackingTilt()V
    .locals 1

    .prologue
    .line 188
    iget v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredTiltListeners:I

    if-nez v0, :cond_0

    .line 189
    invoke-direct {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->start()V

    .line 191
    :cond_0
    iget v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredTiltListeners:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredTiltListeners:I

    .line 192
    return-void
.end method

.method public stop()V
    .locals 1

    .prologue
    .line 272
    iget v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredHeadingListeners:I

    if-nez v0, :cond_0

    iget v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredShakeListeners:I

    if-nez v0, :cond_0

    iget v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredTiltListeners:I

    if-nez v0, :cond_0

    .line 273
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mSensorManager:Landroid/hardware/SensorManager;

    invoke-virtual {v0, p0}, Landroid/hardware/SensorManager;->unregisterListener(Landroid/hardware/SensorEventListener;)V

    .line 275
    :cond_0
    return-void
.end method

.method public stopAllListeners()V
    .locals 5

    .prologue
    const/4 v4, 0x0

    .line 344
    iput v4, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredTiltListeners:I

    .line 345
    iput v4, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredShakeListeners:I

    .line 346
    iput v4, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredHeadingListeners:I

    .line 348
    :try_start_0
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->stop()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 353
    :goto_0
    return-void

    .line 350
    :catch_0
    move-exception v0

    .line 351
    .local v0, e:Ljava/lang/Exception;
    sget-object v1, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v2, "ORMMA AccelListener"

    const-string v3, "Runtime exception in stop()"

    new-array v4, v4, [Ljava/lang/Object;

    invoke-virtual {v1, v2, v3, v4}, Lcom/burstly/lib/util/LoggerExt;->logError(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    goto :goto_0
.end method

.method public stopTrackingHeading()V
    .locals 1

    .prologue
    .line 251
    iget v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredHeadingListeners:I

    if-lez v0, :cond_0

    iget v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredHeadingListeners:I

    add-int/lit8 v0, v0, -0x1

    iput v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredHeadingListeners:I

    if-nez v0, :cond_0

    .line 252
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->stop()V

    .line 254
    :cond_0
    return-void
.end method

.method public stopTrackingShake()V
    .locals 1

    .prologue
    .line 218
    iget v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredShakeListeners:I

    if-lez v0, :cond_0

    iget v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredShakeListeners:I

    add-int/lit8 v0, v0, -0x1

    iput v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredShakeListeners:I

    if-nez v0, :cond_0

    .line 219
    const/4 v0, 0x3

    invoke-virtual {p0, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->setSensorDelay(I)V

    .line 220
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->stop()V

    .line 222
    :cond_0
    return-void
.end method

.method public stopTrackingTilt()V
    .locals 1

    .prologue
    .line 198
    iget v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredTiltListeners:I

    if-lez v0, :cond_0

    iget v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredTiltListeners:I

    add-int/lit8 v0, v0, -0x1

    iput v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->mRegisteredTiltListeners:I

    if-nez v0, :cond_0

    .line 199
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/listener/AccelListener;->stop()V

    .line 201
    :cond_0
    return-void
.end method
